<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/fuman/js/oversea.js"></script>
<title>ebay账单列表</title>
<script type="text/javascript">
	function delEbayBill(id) {
		if(confirm("确定删除?")){
			$.post("/EbayMessage/ajaxbutton", {"op": "delEbayBill","id":id},
					function(data){
						if(data == 200)
						{
							alert("删除成功!");
							window.location.reload();
						}
					},"text")
		}
		
	}
</script>
<body class="withvernav">
<div class="bodywrapper">
	{{include file='/public/leftmenu.tpl'}}
	<div class="centercontent tables">
		<div class="pageheader notab">
			<h1 class="pagetitle">ebay账单列表</h1>
			<span class="pagedesc"></span>
			<div class="menulist">
				<ul class="profile_summary">
					{{if $managers || in_array('291',$showpower)}}
					<li><a href="/EbayMessage/addEbayBill" ><span>添加ebay账单</span></a></li>
					{{/if}}
				</ul>
			</div>
		</div>
		<!--pageheader-->

		<div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
		<div id="contentwrapper" class="contentwrapper">
			<!--搜索栏-->
			<form class="stdform stdform2" method="get" action="/EbayMessage/getEbayBillList">
				<div class="tableoptions">
					店铺:
					<select name="shopid" id="shopid" class="selection select2_group" style="width:200px;" >
						<option value="">请选择</option>
						{{foreach from=$shoplist item=li key=key}}
						<option value="{{$li.id}}" {{if $shopid eq $li.id}}selected{{/if}}>{{$li.name}}</option>
						{{/foreach}}
					</select>

					时间: <input type="text" name="startdate" id="startdate" class="width100" placeholder="请输入开始日期" value="{{$startdate}}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
					- <input type="text" name="enddate" id="enddate" class="width100" placeholder="请输入结束日期" value="{{$enddate}}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
					<button class="btn btn_orange btn_search radius50">Search</button>
				</div>
			</form>
			<!--搜索栏结束-->

			<table cellpadding="0" cellspacing="0" border="0" class="stdtable">
				<thead>
				<tr>
					<th class="head1">序号</th>
					<th class="head0">店铺名</th>
					<th class="head1">应付金额(RMB)</th>
					<th class="head0">应付金额(USD)</th>
					<th class="head1">开始日期</th>
					<th class="head1">结束日期</th>
					<th class="head1">操作人</th>
					<th class="head0">操作时间</th>
					<th class="head0">操作</th>
				</tr>
				</thead>
				<tbody>
				{{foreach from=$list item=li key=key}}
				<tr>
					<td>{{$li.id}}</td>
					<td>{{$li.shopName}}</td>
					<td>{{$li.insertionFeeRMB}}</td>
					<td>{{$li.insertionFee}}</td>
					<td>{{$li.startDate}}</td>
					<td>{{$li.endDate}}</td>
					<td>{{$li.createName}}</td>
					<td>{{$li.addTime}}</td>
					<td>
						<a href="/EbayMessage/addEbayBill?id={{$li.id}}" target="_blank">编辑</a>
						{{if $managers || $li.createName eq $username}}
						<a href="javascript:void(0)" onClick="delEbayBill({{$li.id}})">删除</a>
						{{/if}}
					</td>
				</tr>
				{{/foreach}}
				</tbody>

			</table>
			<div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
			<br />
			<br />
		</div>
	</div>
	<!--bodywrapper-->
</body>
</html>